using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class Table3dStoryDao:DaoBase<Table3dStory>
    {
        public override void AddPrimaryIndex(Table3dStory model)
        {
            cachePrimary[model.StoryId.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "Table3dStory.txt";
        }

        protected override Table3dStory ParseRowData(string[] rowData)
        {
            Table3dStory data = new Table3dStory();
			data.StoryId = rowData [0];
			data.StoryResourceName = rowData [1];
			data.StoryActor = rowData [2];

            if (string.IsNullOrEmpty(rowData[3]))
            {
                data.StoryDuration = 0;
            }
            else
            {
                data.StoryDuration = double.Parse(rowData[3]);
            }
			data.StoryMusic = rowData [4];
			data.StorySound = rowData [5];
			data.StoryChangeFace = rowData [6];
			data.StorySubtitle = rowData [7];

            return data;
        }



    }

}
